#ifndef _DBF_H
#define _DBF_H

#include <types.h>

//----------------------------------------------------------------------------//

typedef struct
{
   BYTE bId;
   BYTE bDate[ 3 ];
   LONG lnRecs;
   WORD wDataOffset;
   WORD wRecSize;                       // 12 bytes
   BYTE bReserved1[ 16 ];    // BYTE bDummy[ 20 ];
   BYTE bProdIndex;
   BYTE bCodePage;
   BYTE bReserved2[ 2 ];
} DBFHEAD, * PDBFHEAD;

//----------------------------------------------------------------------------//

typedef struct
{
   BYTE szName[ 11 ];
   BYTE bType;
   BYTE bDummy[ 4 ];
   union {
      BYTE bCharLen;
      struct {
         BYTE bNumLen;
         BYTE bDec;
      } Len;
   };
   WORD wOffset;
   BYTE bFill[ 12 ];
} FIELD, * PFIELD;

//----------------------------------------------------------------------------//

#endif